import request from "@/utils/request"
//部门列表
export function getDictionary(data){
    return request({
        url:'/system/dict/type/list',
        method:'post',
        data,
    })
}
//删除字典
export function delDictionary(id){
    return request({
        url:`/system/dict/type/${id}`,
        method:'delete'
    })
}

//新增字典
export function newDictionary(data){
    return request({
        url:'/system/dict/type/add',
        method:'post',
        data
    })
}
//导出文件
export function exportDictionary(){
    return request({
        url:'/system/dict/type/export',
        method:'get',
        responseType: 'blob'
    })
}
//查看字典详情 
export function viewDictionary(id){
    return request({
        url:`/system/dict/type/${id}`,
        method:'get',
    })
}
//编辑字典
export function emitDictionary(data){
    return request({
        url:'/system/dict/type/updateDict',
        method:'put',
        data
    })
}